package cn.caplike.demo.repository.design.pattern.decorator;

class ConcreteDecorator1 extends Decorator {
    public ConcreteDecorator1(Component component) {
        super(component);
    }

    @Override
    public void doSomething() {
        super.doSomething(); // 多态
        this.doAnotherThing();
    }

    private void doAnotherThing() {
        System.out.println("ConcreteDecorator1: 功能 B");
    }
}
